appSkeleton.directive('functionB',
    function ($templateCache, $rootScope,$timeout) {
        return {
            //parameters
            restrict: 'AE',
            replace: true,
            template: $templateCache.get("function-B-tpl.html"),

            controller: function ($scope, $element, $filter, t2iSpinnerService) {
                $scope.options = {
                    visible: true,
                    placeholder: "Search",
                    isDisplayFilterIcon: false
                };
                $scope.t2iSpinnerService = t2iSpinnerService;
                $scope.buttons = [
                    {"id": 1, "icon": "fa fa-th  item-icon", "name": "Button-A"},
                    {"id": 2, "icon": "fa fa-bar-chart  item-icon", "name": "Button-B"},
                    {"id": 3, "icon": "fa fa-map-marker item-icon", "name": "Button-C"},
                    {"id": 4, "icon": "fa fa-sitemap item-icon", "name": "Button-D"},
                    {"id": 5, "icon": "fa fa-calendar  item-icon", "name": "Button-F"}
                ];


            },


            scope: {},
            link: function ($scope, $element) {
                $scope.t2iSpinnerService.stop(0);

                $timeout(function(){
                    $scope.t2iSpinnerService.start($element.find("#spinner"));

                })
            }

        };
    });
